#include <iostream>
using std::cout;
using std::endl;
using std::string;

void test0(){
    cout << sizeof(string) << endl;
    string s1 = "helloworldaaaaa";
    string s2 = "helloworldaaaaaa";
    cout << &s1 << endl;//string对象的首地址
    printf("%p\n",s1.c_str());//字符串内容的首地址
    cout << &s2 << endl;//string对象的首地址
    printf("%p\n",s2.c_str());//字符串内容的首地址

    string * pstr = new string("helloworldaaaa");
    cout << pstr << endl;
    printf("%p\n",&((*pstr)[0])) ;

    string * pstr2 = new string("helloworldaaaaaa");
    cout << pstr2 << endl;
    printf("%p\n",&((*pstr2)[0])) ;
}

int main(void){
    test0();
    return 0;
}
